home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
THINKC
/
3_0
/
DOUBLEDE
/
WNEAVAIL.C
< prev
next >
Wrap
C/C++ Source or Header
|
1988-07-23
|
501b
|
24 lines
#include "MacTypes.h"
#include "OSUtil.h"
#define WNETrapNum 0x60
#define UnImplTrapNum 0x9F
Boolean WNEavail()
{
/*
Are we running under MultiFinder? If we are, then
the "WaitNextEvent" trap will be defined.
*/
Boolean WNEIsImplemented;
OSErr err;
SysEnvRec theWorld;
err = SysEnvirons(1,&theWorld);
WNEIsImplemented = (theWorld.machineType >= 0) &&
(NGetTrapAddress( WNETrapNum,ToolTrap) !=
NGetTrapAddress(UnImplTrapNum,ToolTrap));
return(WNEIsImplemented);
}